package com.scut.graduation.entity.vo;

import org.springframework.util.StringUtils;

/**
 * 
 * @author xiaoliang
 * @date 2022/06/13 17:29
 **/
public class LoginVo {

    /**
     * 学号工号，为本表账号
     */
    private String username;
    /**
     * 用户密码
     */
    private String password;
    /**
     * 登陆者身份，0表示学生，1表示老师
     */
    private String identify;

    public boolean isValidated(){
        if (!StringUtils.isEmpty(username)&&!StringUtils.isEmpty(password)) {
            if ("0".equals(identify)||"1".equals(identify)){
                return true;
            }
        }
        return false;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getIdentify() {
        return identify;
    }

    public void setIdentify(String identify) {
        this.identify = identify;
    }
}
